package com.wumao.service;

import com.wumao.pojo.Type;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-15 20:05
 */
public interface TypeService {

    /*实现增删改查操作*/

    Type addType(Type type);

    Type getType(Long id);
    /*分页查询*/
    Page<Type> listType(Pageable pageable);

    List<Type> listType();

    List<Type> listTypeTop(Integer size);

    void deleteType(Long id);
    /*通过名称来查询Type*/
    Type getTypeByname(String name);

    /*先查找到Type再修改*/
    Type updateType(Long id,Type type);
}
